package hcn.protocol.brandnew.provider;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 危急值信息通知
 *
 * @author neoLin - 2023/08/09 11:23
 **/
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class LabWarnResultNotifyRequest {
    /**
     * 患者基本信息
     */
    @XmlElement(name = "Patient")
    private Patient patient;

    /**
     * 就诊摘要
     */
    @XmlElement(name = "Visit")
    private Visit visit;

    /**
     * 危急值信息
     */
    @XmlElement(name = "LabWarnRecord")
    private LabWarnRecord labWarnRecord;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Patient {
        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;

        /**
         * 业务系统患者档案类型
         */
        @XmlElement(name = "SourcePatientIdType")
        private String sourcePatientIdType;

        /**
         * 建档机构代码
         */
        @XmlElement(name = "AuthorOrganization")
        private String authorOrganization;

        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;

        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;

    }


    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Visit {
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 就诊机构代码
         */
        @XmlElement(name = "visitOrganization")
        private String visitOrganization;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        private String patientType;
        /**
         * 患者类型名称
         */
        @XmlElement(name = "PatientTypeName")
        private String patientTypeName;
        /**
         * 就诊卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 病床号
         */
        @XmlElement(name = "SickbedId")
        private String sickbedId;
        /**
         * 用户类型
         */
        @XmlElement(name = "UserType")
        private String userType;
        /**
         * 电话号码
         */
        @XmlElement(name = "TelPhone")
        private String telPhone;
    }


    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class LabWarnRecord {

        /**
         * 危急值报告编号
         */
        @XmlElement(name = "WarnId")
        private String warnId;
        /**
         * 检验条码号
         */
        @XmlElement(name = "BarcodeNo")
        private String barcodeNo;
        /**
         * 检验标本号
         */
        @XmlElement(name = "SampleNo")
        private String sampleNo;
        /**
         * 危急值发布机构代码
         */
        @XmlElement(name = "ReportOrganization")
        private String reportOrganization;
        /**
         * 发布科室代码
         */
        @XmlElement(name = "ReportDept")
        private String reportDept;
        /**
         * 发布科室名称
         */
        @XmlElement(name = "ReportDeptName")
        private String reportDeptName;
        /**
         * 发布医师签名
         */
        @XmlElement(name = "ReportDoctor")
        private String reportDoctor;
        /**
         * 发布日期时间
         */
        @XmlElement(name = "ReportTime")
        private String reportTime;
        /**
         * 危急值需通知医师代码
         */
        @XmlElement(name = "NoticeDoctor")
        private String noticeDoctor;
        /**
         * 申请项目名称
         */
        @XmlElement(name = "ExamText")
        private String examText;
        /**
         * 检验项目名称
         */
        @XmlElement(name = "TestName")
        private String testName;
        /**
         * 检验项目代码
         */
        @XmlElement(name = "TestID")
        private String testID;
        /**
         * 危急值提示信息
         */
        @XmlElement(name = "WarnInfo")
        private String warnInfo;
        /**
         * 检验结果
         */
        @XmlElement(name = "TestResult")
        private String testResult;
        /**
         * 检验结果计量单位
         */
        @XmlElement(name = "ResultUnit")
        private String resultUnit;
    }



}
